<?php

/**
 * CelebrityPK form.
 *
 * @package    iEasy
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class CelebrityPKForm extends BaseCelebrityPKForm
{
    public function configure()
    {
        sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url'));
        $this->widgetSchema['celebrity1_id']->setOption(
            'renderer_class',
            'sfWidgetFormDoctrineJQueryAutocompleter'
        );
        $this->widgetSchema['celebrity1_id']->setOption('renderer_options', array(
                                                                                 'model' => 'Celebrity',
                                                                                 'url' => url_for("celebrityVote/filterCelebrity") // example only
                                                                            ));

        $this->widgetSchema['celebrity2_id']->setOption(
            'renderer_class',
            'sfWidgetFormDoctrineJQueryAutocompleter'
        );
        $this->widgetSchema['celebrity2_id']->setOption('renderer_options', array(
                                                                                 'model' => 'Celebrity',
                                                                                 'url' => url_for("celebrityVote/filterCelebrity") // example only
                                                                            ));
    }
}
